using System;
using SheLife.Domain.Common;

namespace SheLife.Domain.Entities
{
    /// <summary>
    /// 系统任务日志实体类
    /// </summary>
    public class SystemTaskLog : BaseEntity
    {
        /// <summary>
        /// 任务ID
        /// </summary>
        public Guid TaskId { get; set; }

        /// <summary>
        /// 任务名称
        /// </summary>
        public string TaskName { get; set; }

        /// <summary>
        /// 任务类型
        /// </summary>
        public string TaskType { get; set; }

        /// <summary>
        /// 任务状态
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// 执行结果
        /// </summary>
        public string Result { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string ErrorMessage { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 执行时长(毫秒)
        /// </summary>
        public long? Duration { get; set; }

        /// <summary>
        /// 执行人ID
        /// </summary>
        public Guid? ExecutorId { get; set; }

        /// <summary>
        /// 执行人名称
        /// </summary>
        public string ExecutorName { get; set; }

        /// <summary>
        /// 服务器IP
        /// </summary>
        public string ServerIp { get; set; }

        /// <summary>
        /// 服务器名称
        /// </summary>
        public string ServerName { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        // 导航属性
        public SystemTask Task { get; set; }
        public SystemUser Executor { get; set; }
    }
}